<?php
/**
 * 验证码生成类
 * @author yulipu
 */
class VerifyCodeAction {
	public function __construct() {}
	
	public function initVerifyCode() {
		$width = 80; $height = 30;
		import('ORG.Util.VerifyCode');
		if(isset($_GET['w'])) $width = intval($_GET['w']);
		if(isset($_GET['h'])) $height = intval($_GET['h']);
		
		$v = new VerifyCode($width, $height);
		
		$v->showVerifyCodeImage('./Public/elephant.ttf');	// 相对入口文件
		
		$_SESSION['verifyCode'] = strtolower($v->getVerifyCodes());	
	}
}